#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      Pablo
#
# Created:     29/02/2012
# Copyright:   (c) Monxcleyr Productions 2012
# Licence:     GPL v3
#-------------------------------------------------------------------------------
#!/usr/bin/env python

import ConfigParser, os
from ConfigParser import RawConfigParser

class Config(RawConfigParser):
  def __init__(self):
    RawConfigParser.__init__(self)

  def getint_tuple(self, section, option):

    """ Returns Returns a tuple of ints"""

    term = self.get(section, option)
    term = term.split(",")

    temp = []
    for item in term:
      temp.append(int(item))

    returntuple = tuple(temp)

    return returntuple

  def getfloat_tuple(self, section, option):

    """ Returns Returns a tuple of ints"""

    term = self.get(section, option)
    term = term.split(",")

    temp = []
    for item in term:
      temp.append(float(item))

    returntuple = tuple(temp)

    return returntuple


  def getstr_tuple(self, section, option):

    """ Returns a tuple of strings"""

    term = self.get(section, option)
    term = term.split(",")

    temp = []
    for item in term:
      temp.append(str(item))

    returntuple = tuple(temp)

    return returntuple


  def getint_list(self, section, option):

    """ Returns Returns a list of ints"""

    term = self.get(section, option)
    term = term.split(",")

    temp = []
    for item in term:
      temp.append(int(item))

    return temp


  def getstr_list(self, section, option):

    """ Returns a list of strings"""

    term = self.get(section, option)
    term = term.split(",")

    temp = []
    for item in term:
      temp.append(str(item))

    return temp

  def item_list(self, section):

    """ Returns a list of items"""

    term = self.items(section)

    temp = []
    for item in term:
      temp.append(item[1])

    return temp


if __name__ == '__main__':
  main()
